/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package myftp.app.renderer;

import java.awt.Component;
import javax.swing.BoundedRangeModel;
import javax.swing.JProgressBar;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author CAVARLE Glenn, LUCAS Stéphane
 * Renderer de la barre de progression
 */
public class ProgressBarRenderer extends JProgressBar implements TableCellRenderer {

    public ProgressBarRenderer() {
        super();
    }

    public ProgressBarRenderer(BoundedRangeModel newModel) {
        super(newModel);

    }

    public ProgressBarRenderer(int orient) {
        super(orient);

    }

    public ProgressBarRenderer(int min, int max) {
        super(min, max);

    }

    public ProgressBarRenderer(int orient, int min, int max) {
        super(orient, min, max);
    }

    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

	/* Mise à jour de la valeur de l'avancement de la barre */
        setValue((int) ((Float) value).floatValue());
        return this;
    }
}
